﻿@model mtm.Articles.Models.ArticleViewModel
@{ 
    /* Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich 
       To learn more about mytrip.mvc visit  
       http://mytripmvc.net  http://mytripmvc.codeplex.com 
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */ 
}
@{
    ViewBag.Title = Html.MytripPageTitle(Model.Article.Title, "/");
    ViewBag.Keywords=Html.MytripPageTitle(Model.Article.Title, ",");
    ViewBag.Description=Html.MytripPageTitle(Model.Article.Title, ",");
}
@section scriptlink{
@Html.ScriptLink("MicrosoftAjax.js,MicrosoftMvcAjax.js,jquery.validate.min.js,jquery.validate.unobtrusive.min.js,SLPlaerChrome.js,Page/Articles.js")
}
@section contentSmall{
@Html.Partial("_sideBar") 
}
@section contentBig{
<div id="votes" class="right">
@Html.ArticleRating(Model.Article.ApprovedVotes, true, Model.Article.TotalVotes, Model.VotesCount)
@Html.HiddenFor(x=>x.VotesCount)
@Html.HiddenFor(x=>x.Article.ArticleId)
</div>
@Html.ShowTitleArticle(Model.Article, Model.ReturnId) 
<div class="content">
@Html.ShowBodyArticle(Model.Article) 
<table class="noborders"><tr><td>
@Html.ArticlePager(Model.PagesIds,Model.Path)
</td><td>
@Html.ArticleOptions(Model.Article,Model.isSubscribed)
</td></tr></table>
</div><div class="last"></div> 
<table class="@WrapRes.StyleTable2_12">
<tr>
@Html.Raw(string.Format(WrapRes.StyleTable2_14, Model.tableWidth))
@if (Model.showRelatedLinks){
@Html.Raw(string.Format(WrapRes.StyleTable2_15, Model.tableWidth))
}
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_17, Model.tableWidth))
<div class="info">
@Html.ShowArticleTags(Model.Article)
@Html.ArticleSpecification(Model.Article)
</div>
@Html.Raw(WrapRes.StyleTable2_13)
@if (Model.showRelatedLinks){ 
@Html.Raw(string.Format(WrapRes.StyleTable2_18, Model.tableWidth))
<div class="info">
@Html.ShowRelated(Model.Article)
</div>
@Html.Raw(WrapRes.StyleTable2_13)
} 
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_19, Model.tableWidth))
@if (Model.showRelatedLinks)
{
@Html.Raw(string.Format(WrapRes.StyleTable2_20, Model.tableWidth))
}
</tr>
</table>
@Html.ShowComments(Model.Article, Model.ReturnId)     
@if (Model.Article.ApprovedComment && (User.Identity.IsAuthenticated || Model.Article.IncludeAnonymComment))
{
    if (Model.Blog)
    {
<h3 class="title">@ArticleLanguage.add_comment</h3>
    }
    {
        using (Html.BeginForm(new { id = Model.Article.ArticleId }))
        {
<div class="last"></div>
<div class="content">
@Html.HiddenFor(model => model.Blog)
@Html.HiddenFor(model => model.Path)
@Html.HiddenFor(model => model.Title)
@Html.HiddenFor(model => model.Username)
@Html.HiddenFor(model => model.ReturnId)
@if (!User.Identity.IsAuthenticated && Model.Article.IncludeAnonymComment)
{
<div class="editor-label">
@Html.LabelFor(model => model.AnonymName, ArticleLanguage.name)
</div><div class="editor-field">
@Html.TextBoxFor(model => model.AnonymName)
@Html.ValidationMessageFor(model => model.AnonymName)
</div><div class="editor-label">
@Html.LabelFor(model => model.AnonymEmail, ArticleLanguage.email)
</div><div class="editor-field">
@Html.TextBoxFor(model => model.AnonymEmail) 
@Html.ValidationMessageFor(model => model.AnonymEmail)
</div>
} 
<div class="editor-field"><div class="dark">
@Html.TextAreaFor(model => model.Comment, new { id = "addCommentEditor", style = "height: 150px;" })
@Html.ValidationMessageFor(model => model.Comment)
</div></div>
@if (!User.Identity.IsAuthenticated && Model.Article.IncludeAnonymComment)
{
<div class="editor-label">
@Html.CaptchaImage(202, 60, "Times New Roman")
</div><div class="editor-field">
@Html.TextBoxFor(model => model.Captcha)
@Html.ValidationMessageFor(model => model.Captcha)
</div>   
} 
@Html.HiddenFor(model => model.CommentApproved)
<div class="button">
@Html.MytripButton(ArticleLanguage.create, true, "left")
</div></div>
        }
    }
}
<div id="deleteModal" class="window"> 
<div class="modalTC">@CoreLanguage.delete</div>
<div class="modalC">
<table class="leftmidle"><tr><td>
@Html.MytripImage("/images/warning.png", "warning", "i")
</td><td>
<h3 class="hometitle">@CoreLanguage.are_you_sure</h3>
</td></tr></table>  
<div class="button">
@Html.MytripButton(CoreLanguage.cancel, false, "cancel", "right")
@Html.MytripButton(CoreLanguage.remove, true, "ok", "right")      
</div>
</div> 
</div>

<div id="inlineEditComment" style="display:none;"> 
<div>@Html.MytripImage("/images/edite.png", "edit", "img14")
@ArticleLanguage.edit_comment</div>
<table>
<tr>
<td>
<div class="editor-field"><div class="dark">
@Html.TextArea("EditComment", new { id = "inlineCommentEditor", style = "height: 150px;" })
</div></div>
<span class="field-validation-valid" id="Comment_Error"></span>
@Html.Hidden("editId")
</td></tr></table>  
<div class="button">
@Html.MytripButton(CoreLanguage.cancel, true, "cancelInlineEdit", "right")
@Html.MytripButton("   Ok   ", false, "okInlineEditComment","right")   
</div> 
</div>   
}

